package cn.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.mchange.v2.c3p0.ComboPooledDataSource;

public class JdbcUtil {
	private static ApplicationContext ac;
	private static ComboPooledDataSource comboPooledDataSource;
	static{
		ac = new ClassPathXmlApplicationContext(new String[]{"spring.xml"});
		comboPooledDataSource = (ComboPooledDataSource) ac.getBean("comboPooledDataSourceId");
	}
	public static ComboPooledDataSource getComboPooledDataSource() {
		return comboPooledDataSource;
	}
}
